// 文章相关接口

import axios from '@/utils/request'

// 获取指定频道的文章id
export const getChaneelArtList = function (channelId, timestamp) {
  return axios({
    method: 'get',
    url: '/v1_0/articles',
    params: {
      channel_id: channelId,
      timestamp,
      with_top: 1
    }
  })
}

// 获取文章详情
export const getArticleById = function (aid) {
  return axios({
    method: 'get',
    url: `/v1_0/articles/${aid}`
  })
}

// // 文章点赞
// export const addLikeArt = function (target) {
//   return axios({
//     method: 'post',
//     url: '/v1_0/article/likings',
//     data: { target }
//   })
// }

// // 取消文章点赞
// export const disLikeArt = function (target) {
//   return axios({
//     method: 'delete',
//     url: '/v1_0/article/likings/' + target
//   })
// }
